const { ipcRenderer, BrowserWindow } = require("electron");
const axios = require('axios')
window.addEventListener('DOMContentLoaded', () => {
    let bt = document.querySelector('.loginBt')
    let username = document.querySelector('.username')
    let password = document.querySelector('.password')
    bt.addEventListener('click', () => {
        console.log(username.value, password.value)
        if (username.value == '2917292081' && password.value == '123456') {
            localStorage.setItem('port', 8082)
            ipcRenderer.send("sendMessage");
        } else if (username.value == '1518605429' && password.value == '123456') {
            localStorage.setItem('port', 8083)
            ipcRenderer.send("sendMessage");
        }
    })

    let ziyuan = document.querySelector('.right .icon-ziyuan')
    ziyuan.onclick = () => {
        ipcRenderer.send("closeWin", "close")
    }
})